package com.aliengen.thingple.driverapp.data.local;

import com.activeandroid.Model;
import com.activeandroid.annotation.Column;
import com.activeandroid.annotation.Table;
import com.activeandroid.query.Select;
import com.aliengen.thingple.driverapp.R;
import com.aliengen.thingple.driverapp.data.models.Anomaly;
import com.aliengen.thingple.driverapp.network.api.ThingpleAPI;
import com.aliengen.thingple.driverapp.network.api.exception.APICallException;

/**
 * This class is part of the Thingple mobile application for the CMC168 Handheld reader.
 *
 * Copyright AlienGen Limited 2016. All rights reserved.
 *
 * @author Timothé Mermet-Buffet <tim@aliengen.com>
 */
@Table(name = "Event")
public class EventModel extends Model {
    @Column(name = "huashen_number")
    public String huashen_number;

    @Column(name = "timestamp", index = true)
    public long timestamp;

    @Column(name = "truck_id")
    public int truck_id;

    @Column(name = "truck_plate_number")
    public String truck_plate_number;

    @Column(name = "operation_id")
    public int operation_id;

    @Column(name = "cylinder_type")
    public String cylinder_type;

    @Column(name = "anomaly_phase")
    public String anomaly_phase;

    @Column(name = "anomaly_inspection")
    public String anomaly_inspection;

    public EventModel() {
        super();
        this.timestamp = new Long(System.currentTimeMillis() / 1000);
    }
}
